/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Proxy;

/**
 *
 * @author Andreea
 */
public class MediumUser implements FileInterface{
    private MyFile file;

    public MediumUser(MyFile file) {
        this.file = file;
    }

    public MyFile getFile() {
        return file;
    }

    public void setFile(MyFile file) {
        this.file = file;
    }
    
    @Override
    public String showInfo() {
        while(file.getContent().contains("<top-secret>")){
                int start=file.getContent().indexOf("<top-secret>");
                int end=file.getContent().indexOf("</top-secret>");
                file.setContent(file.getContent().substring(0,start)+file.getContent().substring(end+13,file.getContent().length()));
        }      
        return file.getContent();
    }
    
    
}
